<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
				<form ng-submit="searchRe()" class="form-horizontal">
                   	<div class="form-group">
                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.source" style="color: black"
                                    id="source" name="source"  ng-change="messageType()">
                                <option value="lbjr">--联璧金融--</option>
                                <option value="lbn">--习之老板娘--</option>
                                <option value="ld">--习之铃铛--</option>
                                <option value="zqh">--智仟汇--</option>
                            </select>
                    </div>
                        <div class="col-sm-2" ng-hide="messagemobile">
                        <input type="text" class="form-control" ng-model="param.mobile" id="mobile"
                               placeholder="手机号码">
                    </div>
                        <div class="col-sm-2">
                            <select class="form-control" ng-model="param.messageType"
                                    ng-options="d.menuType as d.menuName for d in channelMenuList" id="messageType" ng-change="messagechileType()">
                            </select>
                        </div>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" ng-model="param.messageTitle" id="messageTitle"
                                   placeholder="消息标题" />
                        </div>

                        <div class="col-md-1">
                            <label class="col-sm-1"><button class="ifc-btn btn-primary" type="submit">查 询</button></label>
                            </div>
                        <div class="col-md-1">
                        <label class="col-sm-1"><button class="ifc-btn btn-dark" type="button" ng-click="clearSearch()">重  置</button></label>
                        </div>

                    </div>

				</form>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                    	<!-- <th><input type="checkbox" ng-click="selectAll($event)"/>全选</th> -->
                        <th>序号</th>
                        <th>消息标题</th>
                        <th>手机号码</th>
                        <th>消息类型</th>
                        <th>时间</th>
                        <th>是否已读</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                    	<!-- <td class="v-middle"><input type="checkbox" name="selected" ng-checked="isSelected(item.id)" ng-click="updateSelection($event,item)"/></td> -->
                        <td class="v-middle">{{$index + 1}}</td>
                        <td class="v-middle" title="{{item.messageTitle}}">{{item.messageTitle  | limitTo:10}}</td>
                        <td class="v-middle" >
                            <span ng-if="item.mobile==null">--</span>
                            <span ng-if="item.mobile!=null">{{item.mobile}}</span>
                            </td>
                        <td class="v-middle"  >{{item.typeName}}</td>
                        <td class="v-middle" >{{item.createTime}}</td>
                        <td class="v-middle">
                            <span ng-if="item.readFlag=='Y' && item.mobile!=null">已读</span>
                            <span ng-if="item.readFlag=='N' && item.mobile!=null ">未读</span>
                            <span ng-if=" item.mobile==null ">--</span>
                            </td>
                        <td class="v-middle">
                            <span ng-if="item.isEnable=='Y' ">启用</span>
                            <span ng-if="item.isEnable=='N'  ">禁用</span>
                        </td>
                        <td class="v-middle">
                            <a ui-sref="main.hui.backmessage.detail({id:item.id,source:'{{param.source}}'})"-  class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>详情</a>
                            <a  ng-click="delSubscribe(item.id,item.isEnable)" ng-if="item.isEnable=='Y'"   class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>禁用</a>
                            <a  ng-click="delSubscribe(item.id,item.isEnable)" ng-if="item.isEnable=='N'"   class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>启用</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->
            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->
</div><!-- /.wrapper-md -->